| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

Public Member Functions | List of all members
nkWinUi::RelativeLayout Class Referencefinal

Implements a layout positioning its children components relative to each other. More...

Inheritance diagram for nkWinUi::RelativeLayout:

## Public Member Functions
| RelativeLayout (System *system) noexcept
| RelativeLayout (const RelativeLayout &)=delete
virtual | ~RelativeLayout ()
Component * | getComponentAt (unsigned int index) const
virtual void | setParentComponent (Component *parent) override
void | addComponent (Component *component, const nkMaths::Rectangle &area)
void | addComponent (Component *component, const nkMaths::Rectangle &area, RELATIVE_POSITION position, Component *relativeTo)
virtual void | removeComponent (Component *component) override
virtual void | update () override
virtual void | exportComponentsNodeEntry (nkExport::Node *rootNode) override
virtual void | processComponentsNodeEntry (nkExport::Node *rootNode) override
RelativeLayout & | operator= (const RelativeLayout &)=delete
Public Member Functions inherited from nkWinUi::Layout
| Layout (System *system) noexcept
virtual | ~Layout ()
Component * | getParentComponent () const
System * | getSystem () const
LAYOUT_TYPE | getType () const
virtual void | exportClassToTree (nkExport::Node *rootNode) override
virtual void | importClassFromTree (nkExport::Node *rootNode) override
Public Member Functions inherited from nkExport::Exportable
| Exportable () noexcept
virtual | ~Exportable ()

## Detailed Description

Implements a layout positioning its children components relative to each other.

## Constructor & Destructor Documentation

## ◆ RelativeLayout() [1/2]

nkWinUi::RelativeLayout::RelativeLayout | ( | System * | system | ) |
| noexcept

Constructor.

Parameters

  system | The parent system in which the layout will live.

## ◆ RelativeLayout() [2/2]

nkWinUi::RelativeLayout::RelativeLayout | ( | const RelativeLayout & |  | ) |
| delete

Copy constructor.

## ◆ ~RelativeLayout()

virtual nkWinUi::RelativeLayout::~RelativeLayout | ( |  | ) |
| virtual

Destructor.

## Member Function Documentation

## ◆ getComponentAt()

Component* nkWinUi::RelativeLayout::getComponentAt | ( | unsigned int | index | ) | const

Parameters

  index | The wanted component's index.

Returns
  The child component at given index, if available. If out of bounds, nullptr.

## ◆ setParentComponent()

virtual void nkWinUi::RelativeLayout::setParentComponent | ( | Component * | parent | ) |
| override virtual

See Layout::setParentComponent().

Reimplemented from nkWinUi::Layout.

## ◆ addComponent() [1/2]

void nkWinUi::RelativeLayout::addComponent | ( | Component * | component,
|  | const nkMaths::Rectangle & | area
| ) |  |

Adds a child component to be placed by this layout.

Parameters

  component | The component to place.
  area | The area this component will have in the layout.

Remarks
  Can be called for components that should act as anchor in the layout.

## ◆ addComponent() [2/2]

void nkWinUi::RelativeLayout::addComponent | ( | Component * | component,
|  | const nkMaths::Rectangle & | area,
|  | RELATIVE_POSITION | position,
|  | Component * | relativeTo
| ) |  |

Adds a child component to be place by this layout.

Parameters

  component | The component to place.
  area | The area this component will have in the layout, relative to the relativeTo component.
  position | The position the component should have, compared to the relativeTo component.
  relativeTo | The component being the anchor to place the new child component to add. It should be part of this layout, already.

## ◆ removeComponent()

virtual void nkWinUi::RelativeLayout::removeComponent | ( | Component * | component | ) |
| override virtual

See Layout::removeComponent().

Implements nkWinUi::Layout.

## ◆ update()

virtual void nkWinUi::RelativeLayout::update | ( |  | ) |
| override virtual

See Layout::update().

Implements nkWinUi::Layout.

## ◆ exportComponentsNodeEntry()

virtual void nkWinUi::RelativeLayout::exportComponentsNodeEntry | ( | nkExport::Node * | rootNode | ) |
| override virtual

See Layout::exportComponentsNodeEntry().

Reimplemented from nkWinUi::Layout.

## ◆ processComponentsNodeEntry()

virtual void nkWinUi::RelativeLayout::processComponentsNodeEntry | ( | nkExport::Node * | rootNode | ) |
| override virtual

See Layout::processComponentsNodeEntry().

Reimplemented from nkWinUi::Layout.

## ◆ operator=()

RelativeLayout& nkWinUi::RelativeLayout::operator= | ( | const RelativeLayout & |  | ) |
| delete

Copy assignment.

The documentation for this class was generated from the following file:

- Documentation/Headers/NilkinsWinUi/Layouts/RelativeLayout.h